home *** CD-ROM | disk | FTP | other *** search
/ DOpus Plus / DOpus Plus.iso / Tutorial / ARexx Tutorial / TuteRexx / Ports.dopus5 < prev    next >
Text File  |  1998-08-10  |  602b  |  28 lines

  1. /*
  2. $VER: Ports.dopus5 1.2 (10.8.98)
  3. Show all system message ports in an DirectoryOpus requester
  4. */
  5.  
  6. parse arg portname function source dest arguments .
  7. address value portname
  8. options results
  9.  
  10. if function = 'init' then do
  11.   dopus command "Ports" program "Ports" desc "'Display all system message ports'"
  12.   exit
  13.   end
  14.  
  15. lf = '0a'x
  16. port = ''
  17. names = SHOW(ports,,'^')
  18.  
  19. do while names ~= ""
  20.   parse var names currport "^" names
  21.   if left(currport,4) = '|WSH' then currport = '<'||substr(currport,2)||'>'
  22.   port = port||currport||lf
  23. end
  24. port = "Message Ports:"||lf||lf||port
  25. dopus request '"'port'" Ok'
  26. exit
  27.  
  28.